﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using Ninject;
using RobotBattle2.Rsl2;
using RobotBattle2.Interpreter;
using Microsoft.Practices.ServiceLocation;
using CommonServiceLocator.NinjectAdapter;

namespace RobotBattle2.Windows {
	static class Program {
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main() {
			var kernel = new StandardKernel();
			kernel.Bind<ScriptParserBase>().To<Rsl2Parser>();
			kernel.Bind<ScriptRunnerFactory>().To<InterpreterFactory>();
			var provider = new NinjectServiceLocator(kernel);
			ServiceLocator.SetLocatorProvider(() => provider);
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);
			Application.Run(kernel.Get<MainForm>());
		}
	}
}
